package com.ykq.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ykq.pojo.entity.User;
import com.ykq.system.dao.UserMapper;
import com.ykq.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: education-parent
 * @description:
 * @author: 闫克起2
 * @create: 2022-08-03 11:18
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;
    @Override
    public User selectByName(String username) {
        QueryWrapper<User> wrapper=new QueryWrapper<>();
        wrapper.eq("username",username);
        wrapper.eq("is_deleted",0);
        User user = userMapper.selectOne(wrapper);
        return user;
    }
}
